<a id="desc" class="btn" onclick="jumpPay()">点击支付</a>
        
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script>                
	function jumpPay() {
		let orderId = Date.now();//这里用当前时间戳做订单号（后面使用你自己真实的订单号）
		let payData = {orderId: orderId};

		let payDataStr = JSON.stringify(payData);//因为要吧参数传递给小程序，所以这里需要转为字符串
		const url = `../wxPay/wxPay?payParam=${payDataStr}`;
		wx.miniProgram.navigateTo({
			url: url
		});
		// console.log("点击了去支付", url)
		console.log("点击了去支付")
	}
	
	//获取小程序url里携带的参数
	//let payOk = getQueryVariable("payOk");
    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if (pair[0] == variable) {
                return pair[1];
            }
        }
        return (false);
    }
</script>